package com.example.service;

import com.example.domain.ExcelData;
import com.example.domain.RewardPunish;
import com.example.domain.Training;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;
import java.util.List;

/**
 * @author luo
 */

public interface RewardPunishService {
    /**
     * 查询所有的奖惩
     * @return
     */
    public List<RewardPunish> selectReward();

    /**
     * 按id查询奖惩
     * @param id
     * @return
     */
    public RewardPunish selectRewardById(Integer id);

    /**
     * 模糊查询
     * @param rewardPunish
     * @return
     */
    public List<RewardPunish> selectRewardByName(RewardPunish rewardPunish);

    /**
     * 添加奖惩信息
     * @param rewardPunish
     * @return
     */
    public int addRewardPunish(RewardPunish rewardPunish);

    /**
     * 更新奖惩信息
     *
     * @param rewardPunish
     * @return
     */
    public int updateRewardPunish(RewardPunish rewardPunish);
    /**
     * 按id删除
     * @param id
     * @return
     */
    @Delete("delete from rewardpunish where id=#{id};")
    public int deleteRewardPunish(Integer id);
    /**
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    public PageInfo<RewardPunish> findPage(int page, int size);
    /**
     * 打印
     * @return
     */
    public ExcelData getOutputExcelProjectData();
}
